import { Bike, ChartPie, CodeComputer, Components, CrossRing, Tool } from '@icon-park/vue-next';
import { markRaw } from 'vue';

const functions = () => import('@/views/tools/functions/index.vue');
const charts = () => import('@/views/tools/charts/index.vue');
const icons = () => import('@/views/tools/icons/index.vue');
const ecology = () => import('@/views/tools/ecology/index.vue');

const pages = {
  path: '/tools',
  name: 'tools',
  redirect: '/tools/functions',
  meta: {
    icon: markRaw(Tool),
    title: '工具'
  },
  children: [
    {
      path: 'functions',
      name: 'tools_functions',
      meta: {
        icon: markRaw(CodeComputer),
        title: '工具函数'
      },
      component: functions
    },
    {
      path: 'charts',
      name: 'tools_charts',
      meta: {
        icon: markRaw(ChartPie),
        title: '图表合集'
      },
      component: charts
    },
    {
      path: 'icons',
      name: 'system_icons',
      meta: {
        icon: markRaw(Bike),
        title: '图标示例'
      },
      component: icons
    },
    {
      path: 'ecology',
      name: 'tools_ecology',
      meta: {
        icon: markRaw(CrossRing),
        title: '系统生态'
      },
      component: ecology
    }
  ]
};

export default pages;
